<?php
include '../../functions.php';
session_start();
function __autoload($className){
    if(substr($className,-10) == 'Controller'){
        include "./Controller/{$className}.php";
    }else{//载入工具类
        include "./Tool/{$className}.php";
    }
}
//控制器
$c = isset($_GET['c']) ? $_GET['c'] : 'Index';
$c = "{$c}Controller";
$controller = new $c;
//方法
$a = isset($_GET['a']) ? $_GET['a'] : 'index';
$controller->$a();